home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1997 February / Software of the Month Club 1997 February.iso / pc / dos / edu / calc / fit_pol2.bat < prev    next >
Encoding:
DOS Batch File  |  1996-10-28  |  456 b   |  18 lines

  1. rem fitting with a polynom and extracting fitting coefficients:
  2. calc Xo = 10*[cm]
  3. calc x = {-0.4*[m]+Xo,0.4*[m]+Xo,1*[cm]}
  4. calc y = (3*[g/m]*(x-Xo)^2+2*(x-Xo)*[g]-1*[g*m])/[cm]
  5. @echo off
  6. rem this function returns fitting coefficients
  7. rem rather than fitted function values:
  8. calc coefs = Fitc(y,p(2))
  9. @pause
  10. rem calc fitted(coefs,x)
  11. rem @pause
  12. calc max(fitted(coefs,x)-y)
  13. calc An(coefs,2)
  14. calc An(coefs,1)
  15. calc An(coefs,0)
  16. calc Xo(coefs)
  17.  
  18.